<div id="content">

    <div id="content-header">

        <div id="breadcrumb"><a href="<?php echo site_url('Login/login') ?>" title="Go to Home" class="tip-bottom"><i
                class="icon-home"></i> 主页</a> <a href="#" class="current">用户管理</a><a href="#" class="current">代理用户等级列表</a></div>
        <h1>代理用户等级列表</h1>
    </div>
    <div class="container-fluid">
        <hr>
        <div class="row-fluid">
            <div class="span12">
                <div class="widget-box">
                    <div class="widget-title"><span class="icon"><i class="icon-th"></i></span>
                        <h5>Data table</h5>
                        <span style="position:absolute;right:0;">
<?php  $url=site_url('auth/show/addagentlevel.html')?>
                            <button class="btn btn-success btn-mini" onClick="window.open('<?php echo $url?>','_self')">新建等级</button>
			</span>
                    </div>
                    <div class="widget-content nopadding">
                        <table class="table table-bordered data-table">
                            <thead>
                            <tr>
                                <th>编号</th>
                                <th>等级名称</th>
                                <th>返利等级</th>
                                <th>返利利率</th>
                                <th>当前人数</th>
                                <th>更新时间</th>
                                <th>操作</th>
                            </tr>
                            </thead>
                            <tbody>
                            <?php
                            $rows=$data[0];
                            foreach($rows as $value):
                            ?>
                            <tr class="gradeX">
                                <td><?php  echo $value['id']?></td>
                                <td><?php  echo $value['level']?></td>
                                <td><?php  echo $value['rLevel']?></td>
                                <td class="center"><?php  echo $value['rebate_rate']?></td>
                                <td class="center"><?php  echo  $value['lidNumber']?></td>
                                <td class="center"><?php echo  date('Y-m-d H:i:s',$value['time'])?></td>
                                <td>
				  <span>

                      <?php
                       $id=intval($value['id']);
                       $url=site_url("user/editAgentLevel/$id");
?>
                      <button class="btn btn-warning btn-mini"
                              onClick="window.open('<?php echo $url;?>','_self')">配置
                    </button>
				  </span>
                                </td>
                            </tr>
                            <?php    endforeach; ?>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>

        </div>

    </div>

</div>
